from ai_translator_v2.translator import TranslationConfig
from ai_translator_v2.translator.pdf_translator import PDFTranslator
from ai_translator_v2.utils import ArgumentParser


def main():
    argument_parser = ArgumentParser()
    args = argument_parser.parse_args()

    config = TranslationConfig()
    config.initialize(args)
    translator = PDFTranslator(config.model_name)
    translator.translate_pdf(config.input_file, output_file_format=config.output_file_format)


if __name__ == '__main__':
    main()
